﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZX.TR.Bussiness;
using ZX.TR.Library;
using ZX.EHR.Library;
using DevExpress.Charts;
using DevExpress.XtraCharts;
using DevExpress.XtraCharts.Web;
using System.Data;
using ZX.Web.UI.Controls;
using System.Text;

namespace ZX.TR.Web
{
    public partial class exportExcel : BasePage
    {
        public string excelContent = "", fileName = "sheet1";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                excelContent = this.Request.Form["ExcelContent"];
                fileName = this.Request.Form["fileName"];
            }
            Response.Clear();
            Response.Buffer = true;
            Response.AppendHeader("content-disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".xls");
            Response.Charset = "GB2312";
            Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
            Response.ContentType = "application/vnd.ms-excel";
            this.EnableViewState = false; 

        }
    }
}